package com.lkd.controller;

import com.lkd.entity.Role;
import com.lkd.result.Result;
import com.lkd.service.RoleService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/api/user-service")
@RequiredArgsConstructor
public class RoleController {
    private final RoleService roleService;

    //角色列表
    @GetMapping("/role")
    public Result roleList(){
        List<Role> roleList= roleService.list();
        return Result.success(roleList);
    }
}
